// 函数接口定义
interface SearchFunc {
    (source: string, subString: string): boolean;
}

// 实现函数接口
const mySearch: SearchFunc = function(src: string, sub: string): boolean {
    return src.search(sub) > -1;
};

console.log(mySearch("Hello TypeScript", "Type")); // 输出: true